package com.naton.mydemo.model.api;

import androidx.annotation.NonNull;


import com.naton.common.network.BaseRetrofitClient;

import java.util.HashMap;

public class RetrofitClient extends BaseRetrofitClient {

    public static RetrofitClient instance;

    private RetrofitClient(){}

    public synchronized static RetrofitClient getInstance(){
        if (instance == null){
            instance = new RetrofitClient();
        }
        return instance;
    }

    /**
     * 获取api接口服务
     * @return
     */
    private ApiService apiService;

    public ApiService getApiService(){
        if (apiService == null){
            apiService = getService(ApiService.class , "https://www.baidu.com");
        }
        return apiService;
    }

    /**
     * 获取公共参数
     * @return
     */
    @NonNull
    @Override
    public HashMap<String, String> getMyPubParamsMap() {
        HashMap<String , String> params = new HashMap<>();
        params.put("device" , "android");
        return new HashMap<>();
    }
}
